﻿using Newtonsoft.Json;
using System.Collections.Generic;
using System.Data;

namespace _批量插入上万条数据
{
    public static class ExtendMethod
    {
        public static DataTable ToDateTable<T>(this List<T> list)
        {
            return JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(list));
        }

    }
}
